-
-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maven Wrapper mvnw and mvnw.cmd built-in support #246
Conversation
@nhojpatrick Have you tested this on Windows? I remember that there were some problems executing mvn.cmd instead of mvn on Windows. |
@aleksandr-m tested on a windows 10 vm that didn't have mvn installed/setup, using
Which errors because deploy doesn't have a valid username and password to actually upload as part of the deploy phase. So it must have found |
6e24801
to
9dc6699
Compare
9dc6699
to
168d15c
Compare
@nhojpatrick Can it be done in that way to use the same maven which user currently uses to run this plugin? |
168d15c
to
6050979
Compare
Using
So @aleksandr-m any preference in a pattern match for env key Working on testing both but it looks like both approaches can be used on a mac using maven 3.6.3. |
@aleksandr-m decided to use both main class check and maven home check to determine if triggered by I think this is now ready to be merged. Also noticed extra config for |
1a38f20
to
411d310
Compare
411d310
to
4d77dc1
Compare
4d77dc1
to
ffb0432
Compare
@aleksandr-m have done some more testing and believe it works on both linux and windows, as well for builds within openshift and other cicd tools that default to mvnw if it's present. |
@aleksandr-m want to add you as a reviewer and request a review but don't have permissions to do that. |
ffb0432
to
8f0e783
Compare
8f0e783
to
053a15c
Compare
@aleksandr-m Could this be reviewed and hopefully merged please. |
@nhojpatrick Can you revert changes to properties. I'm more comfortable with them as they are now. I'll try to find time to review this in a few days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nhojpatrick I don't see any env.JAVA_MAIN_CLASS
in my setup, so mainClassIsMavenWrapper
is always false. And the maven.home
property can be overridden from the command line.
Can you think of any other way to determine if goal is running from the wrapper?
src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java
Show resolved
Hide resolved
src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java
Show resolved
Hide resolved
src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java
Show resolved
Hide resolved
src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java
Show resolved
Hide resolved
src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java
Show resolved
Hide resolved
@nhojpatrick I had more time to test this feature, and seems using |
If
mvnExecutable
is blank, then automatically usemvnw
ormvnw.cmd
depending upon OS, if avaliable.Tested on Mac, that if
mvnw
is present then the current working directory will be used instead of justmvn
.